package com.zust.java.dao.imp;

import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.zust.java.dao.SequenceDao;
import com.zust.java.util.StmtCode;
import com.zust.java.util.StmtMap;

@Repository
public class SequenceDaoImp implements SequenceDao {
    
    @Autowired
    private SqlSession session;
    private String stmt = null;
    
    public int selectCurrentValue(String code) {
        stmt = StmtMap.getStmt(StmtCode.SELECT_CURRENT_VALUE);
        return session.selectOne(stmt, code);
    }

}
